<include file="Public/Header" />
<script src="__SCRIPT__/common.js" type="text/javascript"></script>
 <script type="text/javascript">
  function clear_del()
  {
   if(confirm("确定要删除数据吗？"))
   {
	subform("{:U('Game/GameList', 'do=deleteAll')}");
   }
  }
 </script>

<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">栏目管理</div></td>
      </tr>
    </table>

<div class="main">
    <form action="{:U('Game/Category', 'do=sort')}" method="post" id="form_do" name="form_do">
        <div class="operate">
            <div class="left">
            <input type="button" onclick="window.open('{:U('Game/Category', 'do=add')}','main')" target="main" class="btn_blue" value="添加栏目">
            <input type="button" class="btn_blue" onclick="form_do.submit();" value="更新排序">


            </div>
        </div>
        <div class="list">
            <table width="100%">
                <tr>
                    <th><input  name="chkall" type="checkbox" id="chkall" onclick="selectall(this.form)"></th>
                    <th>编号</th>
                    <th>名称</th>
                    <th>排序</th>
                    <th>操作</th>
                </tr>

                <empty name="vlist">
                <tr>
                <td colspan="7">本区域暂无数据显示...</td>
                </tr>
                <else />
                <volist name='vlist' id='v'>
                    <php>$id = $v['class_id'];</php>
                <tr>
                    <td><input type="checkbox" name="class_id[]" value="{$v.class_id}" ></td>
                    <td>{$v.class_id}</td>

                    <td class="aleft">
                        {$v.html}<span style="color:#000000">{$v.class_name}</span>
                    </td>


                    <td><input type="text" name="sort[{$v.class_id}]" value="{$v.class_sort}" /></td>
                    <td>

                    <a href="{:U('Game/Category', "do=add&id=$id")}">添加子栏目</a>


                    <a href="{:U('Game/Category', "do=edit&id=$id")}">修改</a>
                    <a href="{:U('Game/Category', "do=delete&id=$id")}" class="delete-one">删除</a>
                    </td>
                </tr>

                </volist>
                </empty>
            </table>

        </div>
    </form>
</div>
<include file="Public/Copyright" />
<script type="text/javascript">
    $('.delete-one').click(function(){
        if( ! window.confirm('确定要删除此条目吗？') ){
            return false;
        }
    });
</script>
</body>
</html>
